<?php
include_once "../common.php";
if(isset($_SESSION['login']['ID']))
{
	?>
	<table width="100%" border="0">
        <tr bgcolor="#0099FF">
          <td colspan="3" style="color:#fff;font-weight:bold;">&nbsp;Webshop Gegevens</td>
          <td colspan="2" style="color:#fff;font-weight:bold;">&nbsp;Klantenservice</td>
        </tr>
        <tr>
          <td>Naam:</td>
          <td><input type="text" name="textfield" id="name" tabindex="1" /></td>
          <td width="20">&nbsp;</td>
          <td>Telefoonnummer:</td>
          <td><input type="text" name="textfield4" id="phone" tabindex="3" /></td>
        </tr>
        <tr>
          <td>Url:</td>
          <td>http://<input type="text" name="textfield2" id="website" tabindex="2" /></td>
          <td>&nbsp;</td>
          <td>Email:</td>
          <td>
          	<input type="text" name="textfield5" id="email" tabindex="4" /> <img src="images/icons/question_mark.png" class="extraInfo" title="Wordt niet openbaar gemaakt, men kan via je profiel een contact formulier invullen, Waarnaar het naar dit email gestuurd word" width="16" height="16" />
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><!-- 
          	<input type="file" name="textfield3" id="textfield3" />
          	 -->
          </td>
          <td><p>&nbsp;</p>
          <p>&nbsp;</p></td>
          <td>URL algemene voorwaarden:</td>
          <td>http://<input type="text" name="textfield6" id="urlalg" tabindex="5" /> <img src="images/icons/question_mark.png" class="extraInfo" title="Deze link word op uw profiel geplaatst, Zodat men makkelijk uw algemene voorwaarde kan vinden" width="16" height="16" /></td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <!-- 
        <tr bgcolor="#0099FF">
          <td colspan="5" style="color:#fff;font-weight:bold;">&nbsp;Leveringsgebied</td>
        </tr>
        <tr>
          <td colspan="2">Alle landen per continent</td>
          <td colspan="3">Continent is selecteerbaar en in/uit klapbaar</td>
        </tr>
        <tr>
          <td colspan="5">zie koopkeus.nl voor een voorbeeld (via backend aanmaken en verwijderen inclusie vlag/plaatje)</td>
        </tr>
        <tr>
          <td colspan="5">&nbsp;</td>
        </tr>
        <tr bgcolor="#0099FF">
          <td colspan="5" style="color:#fff;font-weight:bold;">&nbsp;Verificatie site</td>
        </tr>
        <tr>
          <td colspan="2">Hier komt de uitleg over dit process</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2"><input type="radio" name="radio" id="radio" value="radio" />
            Een HTML bestand uploaden</td>
          <td>na het selecteren uitklappen met wat ze moeten doen</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2"><input type="radio" name="radio2" id="radio2" value="radio2" />
            Metatags aan startpagina toevoegen</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2"><input type="submit" name="button2" id="button2" value="Nu Controleren" />
            <input type="submit" name="button3" id="button3" value="Doe ik later" /></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2">(zelfde systeem als google)</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
         -->
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><input type="button" tabindex="6" onClick="javascript: addWebshopNow();" name="button4" id="button4" value=" Webshop Toevoegen " /></td>
        </tr>
      </table>
	<script>
		function addWebshopNow()
		{
			var url = 'factory/addNewWebshop.php';
			var name = $('#name').val();
			var phone = $('#phone').val();
			var website = $('#website').val();
			var email = $('#email').val();
			var urlalg = $('#urlalg').val();
			
			$.post(
				url,
				{
					name : name,
					phone : phone,
					website : website,
					email : email,
					urlalg : urlalg
				},
				function(data){
					if(data=='succes')
					{
						$(".popup").dialog('destroy');
						alert('webshop toegevoegd');
						window.location = window.location;
					}
					else
					{
						alert(data);
					}
				}
			);
		}
	</script>
	<?php
}
else
{
	?>
	U bent niet gemachtigd om hier te kijken
	<?php
}
?>